{extend name="public/base" /}
{block name="title"}
<title>{:confv('title')}</title>
<meta name="keywords" content="{:confv('keywords')}">
<meta name="description" content="{:confv('description')}">
{/block}
{block name="head"}
<link href="__ROOT__/home/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
<link href="__ROOT__/home/basic/css/demo.css" rel="stylesheet" type="text/css" />
<link href="__ROOT__/home/css/cartstyle.css" rel="stylesheet" type="text/css" />
<link href="__ROOT__/home/css/jsstyle.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__ROOT__/home/js/address.js"></script>
<script src="__ROOT__/home/js/layer/layer.js"></script>
{/block}
{block name="body"}


			<div class="clear"></div>
			<div class="concent">
				<!--地址 -->
				<div class="paycont">
					<div class="address">
                        

						<div class="clear"></div>
					</div>
					<!--物流 -->
					<div class="logistics">
                        <h3>详细信息</h3>  
                        <li style="border: 2px #23220e"> 操作师:&nbsp;&nbsp;&nbsp; <input type="text" name="operation" style="height: 35px;width: 200px;border: 2px solid #f40"></li>
                        <li> 助理师:&nbsp;&nbsp;&nbsp; <input type="text" name="assistant" style="height: 35px;width: 200px;border: 2px solid #f40"></li>
                        <li> 备注:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="remark" style="height: 35px;width: 400px;border: 2px solid #f40"></li>
					</div>
					<div class="clear"></div>

					<!--支付方式-->
					<div class="logistics">
						<h3>选择支付方式</h3>
						<ul class="pay-list">
							<!-- <li class="pay card"><img src="__ROOT__/home/images/wangyin.jpg" />银联<span></span></li> -->
							<li class="pay qq" data-value="1"><img src="__ROOT__/home/images/weizhifu.jpg" />微信<span></span></li>
							<li class="pay taobao" data-value="2"><img src="__ROOT__/home/images/zhifubao.jpg" />支付宝<span></span></li>
							<li class="pay taobao" data-value="3"><img src="__ROOT__/home/images/cash.jpg" />现金支付<span></span></li>
						</ul>
					</div>
					<div class="clear"></div>

					<!--订单 -->
					<div class="concent">
						<div id="payTable">
							<h3>确认订单信息</h3>
							<div class="cart-table-th">
								<div class="wp">

									<div class="th th-item">
										<div class="td-inner">商品信息</div>
									</div>
									<div class="th th-price">
										<div class="td-inner">单价</div>
									</div>
									<div class="th th-amount">
										<div class="td-inner">数量</div>
									</div>
									<div class="th th-sum">
										<div class="td-inner">金额</div>
									</div>
								</div>
							</div>
							<div class="clear"></div>

							<tr class="item-list">
								<div class="bundle  bundle-last">

									<div class="bundle-main">
										<ul class="item-content clearfix">
											<div class="pay-phone">
												<li class="td td-item">
													<div class="item-pic">
														<a href="#" class="J_MakePoint">
															<img src="{$order.litpic|default='__ROOT__/home/images/imgsearch1.jpg'}" class="itempic J_ItemImg"></a>
													</div>
													<div class="item-info">
														<div class="item-basic-info">
															<a href="#" class="item-title J_MakePoint" data-point="tbcart.8.11">{$order.title}</a>
														</div>
													</div>
												</li>
												<li class="td td-info">
													<div class="item-props">
														<span class="sku-line">{$order.description}</span>
													</div>
												</li>
												<li class="td td-price">
													<div class="item-price price-promo-promo">
														<div class="price-content">
															<em class="J_Price price-now">{$order.price}</em>
														</div>
													</div>
												</li>
											</div>
											<li class="td td-amount">
												<div class="amount-wrapper ">
													<div class="item-amount ">
														<span class="phone-title">购买数量</span>
														<div class="sl">
															<input class="min am-btn" name="" type="button" value="-" />
															<input class="text_box" name="" type="text" value="{$order.number}" style="width:30px;" />
															<input class="add am-btn" name="" type="button" value="+" />
														</div>
													</div>
												</div>
											</li>
											<li class="td td-sum">
												<div class="td-inner">
													<em tabindex="0" class="J_ItemSum number">{$order.total}</em>
												</div>
											</li>
											<li class="td td-oplist">
												
											</li>

										</ul>
										<div class="clear"></div>

									</div>
							</tr>
							</div>

							</div>
							<div class="clear"></div>
							<div class="pay-total">

							<!--优惠券 -->
							<div class="buy-agio">
								<li class="td td-coupon">

									
								</li>

								<li class="td td-bonus">

									
								</li>

							</div>
							<div class="clear"></div>
							</div>
							<!--含运费小计 -->
							<div class="buy-point-discharge ">
								<p class="price g_price ">
									合计 <span>¥</span><em class="pay-sum">{$order.total}</em>
								</p>
							</div>

							<!--信息 -->
							<div class="order-go clearfix">
								<div class="pay-confirm clearfix">
									<div class="box">
										<div tabindex="0" id="holyshit267" class="realPay"><em class="t">实付款：</em>
											<span class="price g_price ">
                                    <span>¥</span> <em class="style-large-bold-red " id="J_ActualFee">{$order.total}</em>
											</span>
										</div>

										<!-- <div id="holyshit268" class="pay-address">

											<p class="buy-footer-address">
												<span class="buy-line-title">收货人：</span>
												<span class="buy-address-detail">   
                                                <span class="buy-user">艾迪 </span>
												<span class="buy-phone">15871145629</span>
												</span>
											</p>
										</div> -->
									</div>

									<div id="holyshit269" class="submitOrder">
										<div class="go-btn-wrap">
											<a id="J_Go" href="javascript:;" class="btn-go" tabindex="0" title="点击此按钮，提交订单">提交订单</a>
										</div>
									</div>
									<div class="clear"></div>
								</div>
							</div>
						</div>

						<div class="clear"></div>
					</div>
				</div>
				{block name="foot"}{include file="public/footer" /}{/block}
			</div>
			<div class="theme-popover-mask"></div>
			<div class="theme-popover">

				<!--标题 -->
				<div class="am-cf am-padding">
					<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">新增地址</strong> / <small>Add address</small></div>
				</div>
				<hr/>

				<div class="am-u-md-12">
					<form class="am-form am-form-horizontal">

						<div class="am-form-group">
							<label for="user-name" class="am-form-label">收货人</label>
							<div class="am-form-content">
								<input type="text" id="user-name" placeholder="收货人">
							</div>
						</div>

						<div class="am-form-group">
							<label for="user-phone" class="am-form-label">手机号码</label>
							<div class="am-form-content">
								<input id="user-phone" placeholder="手机号必填" type="email">
							</div>
						</div>

						<div class="am-form-group">
							<label for="user-phone" class="am-form-label">所在地</label>
							<div class="am-form-content address">
								<select data-am-selected>
									<option value="a">浙江省</option>
									<option value="b">湖北省</option>
								</select>
								<select data-am-selected>
									<option value="a">温州市</option>
									<option value="b">武汉市</option>
								</select>
								<select data-am-selected>
									<option value="a">瑞安区</option>
									<option value="b">洪山区</option>
								</select>
							</div>
						</div>

						<div class="am-form-group">
							<label for="user-intro" class="am-form-label">详细地址</label>
							<div class="am-form-content">
								<textarea class="" rows="3" id="user-intro" placeholder="输入详细地址"></textarea>
								<small>100字以内写出你的详细地址...</small>
							</div>
						</div>

						<div class="am-form-group theme-poptit">
							<div class="am-u-sm-9 am-u-sm-push-3">
								<div class="am-btn am-btn-danger">保存</div>
								<div class="am-btn am-btn-danger close">取消</div>
							</div>
						</div>
					</form>
				</div>

			</div>

<div class="clear"></div>
<script type="text/javascript" src="__ROOT__/home/basic/js/jquery-1.7.min.js"></script>
<script type="text/javascript">


     $(function(){



         $(".add").click(function(){
          var t = $(this).parent().find('input[class*=text_box]');
          var order_id = '{$order.id}';
          var number = parseInt(t.val())+1;
          $.post('{:url('/changeorder')}',{id:order_id,number:number},function(data){
          	if (data.status==1) {
          		 t.val(data.number)
          		 $('.number').html(data.total)
          		 $('.pay-sum').html(data.total)
          		 $('#J_ActualFee').html(data.total)
          	}
          })
        })


      $(".min").click(function(){
          var t=$(this).parent().find('input[class*=text_box]');
          var order_id = '{$order.id}';
          var number = parseInt(t.val())-1;
          $.post('{:url('/changeorder')}',{id:order_id,number:number},function(data){
          	if (data.status==1) {
          		t.val(data.number)
          		$('.number').html(data.total)
          		$('.pay-sum').html(data.total)
          		$('#J_ActualFee').html(data.total)
          	}
          })
       })

      $('#J_Go').click(function(){
      	   var pay_type=$('.pay-list .selected').attr('data-value')
      	   if (!pay_type) {
      	   	   layer.msg('请选择支付方式');
      	   	   return;
      	   }
      	   var id = '{$order.id}';
      	   var operation = $('input[name=operation]').val();
      	   var assistant = $('input[name=assistant]').val();
      	   var remark = $('input[name=remark]').val();
      	   $.post('{:url('/pay')}',{id:id,pay_type:pay_type,operation:operation,assistant:assistant,remark:remark},function(data){
                if (data.status==1) {
                	window.location.href=data.url;
                }
      	   })
      })

    }) 

</script>
{/block}